<!DOCTYPE html>
<html>
<head>
<title>No new selection was made</title>
<script>
function updateTitle(selectElement) {
    var index = selectElement.selectedIndex;
    document.title = selectElement.options[index].value;
}
</script>
</head>
<body>
<select onchange="updateTitle(this)">
<option value="__open__" >Open</option>
<option value="__closed__" >Closed</option>
<option value="__all__" >All</option>
</select>
</html>
